﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WMS_DATABASE_MYSQL;

namespace WMS_WEBAPI.Controllers.Base
{
    [ApiController]
    [Route("[controller]/[action]")]
    public class CreateDatabaseController : ControllerBase
    {
        private readonly sqlsugar_create _sqlsugar_Create;
        private readonly ILogger<CreateDatabaseController> _logger;
        private readonly string controllerName;

        public CreateDatabaseController(sqlsugar_create sqlsugar_Create, ILogger<CreateDatabaseController> logger)
        {
            _sqlsugar_Create = sqlsugar_Create;
            _logger = logger;
            controllerName = GetType().Name;
        }
        [HttpGet]
        public IActionResult CreateTables()
        {
            _sqlsugar_Create.CreateTable();
            return Ok("建表成功");
        }

    }
}
